package lex.lianliankan.utils;

import java.util.Iterator;
import java.util.LinkedList;

import lex.lianliankan.utils.ModelUtils.Cell;

public class Path
{
	private static final int NEW = 0;
	private static final int ROW = 1;
	private static final int COL = 2;
	private final LinkedList<Cell> path = new LinkedList<Cell>();
	private final int state = NEW;
	
	public boolean add( Cell cell )
	{
		switch( state )
		{
		case NEW:
			int size = path.size();
			if( 0 == size )
				path.add( cell );
			else
			{
				Cell last = path.removeLast();
				if( last.row == cell.row )
				{}
				
			}
			break;
		case ROW:
			break;
		case COL:
			break;
		default:
			return false;
		}
		return false;
	}

	public Iterator<Cell> iterator()
	{
		return path.iterator();
	}
}
